package com.hzsk.lisence.controller;

import com.hzsk.lisence.entity.query.LisenceServiceQuery;
import com.hzsk.lisence.entity.response.IncResponce;
import com.hzsk.lisence.service.LicenseLogSysService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@CrossOrigin
@RestController
@RequestMapping("/api/lisence/log/")
public class LisenceLogController {


    @Resource
    private LicenseLogSysService licenseLogSysService;

    @PostMapping("getloginfo")
    @ApiOperation(value = "查看用户列表")
    public IncResponce getLogInfo(@RequestBody LisenceServiceQuery lisenceServiceQuery){
        IncResponce incResponce = new IncResponce();
        try {
            incResponce.setCode(0);
            incResponce.setData(licenseLogSysService.getLogInfo(lisenceServiceQuery));
        } catch (Exception e) {
            incResponce.setCode(-1);
            incResponce.setErrorMessage(e.toString());
            e.printStackTrace();
        }
        return incResponce;
    }






}
